import axios from '../../axios'

/* 
 * 权限管理模块
 */

// 添加
export const addRight = (data) => {
    return axios({
        url: '/kysj/user/right/addRight',
        method: 'put',
        data
    })
}
// 查询总量
export const count = () => {
    return axios({
        url: '/kysj/user/right/count',
        method: 'get',
    })
}
// 删除
export const deleteRight = (rightId) => {
    return axios({
        url: '/kysj/user/right/deleteRight?rightId=' + rightId,
        method: 'delete',
    })
}
// 通过id查询权限
export const findById = (rightId) =>{
    return axios({
        url: '/kysj/user/right/findById?rightId=' + rightId,
        method: 'get',
    })
} 
// 分页查询权限
export const findByPage = (page,pageSize) => {
    return axios({
        url: '/kysj/user/right/findByPage/'+page+'/'+pageSize+'/',
        method: 'get',
    })
}
// 更新
export const updateRight = (data) => {
    return axios({
        url: '/kysj/user/right/updateRight',
        method: 'post',
        data
    })
}